PACKAGE=gnomemoreartwork-qtcurve
VERSION := $(shell rpm -q --qf '%{version}\n' --specfile $(PACKAGE).spec | head -1)
RELEASE := $(shell rpm -q --qf '%{release}\n' --specfile $(PACKAGE).spec | head -1)
ARCHIVEVER := 0.55.1
ARCHIVE := QtCurve-Gtk2-$(ARCHIVEVER).tar.bz2

rpm:
	cp -f $(ARCHIVE) /usr/src/rpm/SOURCES/
	rpmbuild -ba $(PACKAGE).spec

rpm-install: rpm
	rpm -Uvh --force /usr/src/rpm/RPMS/i586/$(PACKAGE)-$(VERSION)-$(RELEASE).i586.rpm

upload:
	scp /usr/src/rpm/RPMS/i586/$(PACKAGE)-$(VERSION)-$(RELEASE).i586.rpm dsmid@oko.clever.cz:www/pclinuxos/2007/RPMS.czech
	scp /usr/src/rpm/SRPMS/$(PACKAGE)-$(VERSION)-$(RELEASE).src.rpm dsmid@oko.clever.cz:www/pclinuxos/2007/SRPMS.czech
	ssh dsmid@oko.clever.cz www/pclinuxos/2007/regenerate
